//mutations.js
const mutations = {
    /**
    * 选择tag标签
    */
    mutationSelectTags(state, data){
        let result = false
        for(let i=0; i<state.stateTagsList.length;i++){
        if(state.stateTagsList[i].url == data.url){
            return result = true
        }
        }
        result === false ? state.stateTagsList.push(data) : ''
    },
    
    /**
     * 关闭tag标签
     */
    mutationCloseTag(state, data){
        let result = state.stateTagsList.findIndex(item => item.url === data.url)
        state.stateTagsList.splice(result, 1)
    }
}
export default mutations